//package com.lsp.java.jvm;
//
//import java.lang.reflect.Method;
//
//public class MyClassLoaderTest {
//
//    public static void main(String args[]) throws Exception {
//        MyClassLoader classLoader = new MyClassLoader("D:/jvmTest");
//        //加载类的类名，必须和class文件里面的地址一样
//        Class clazz = classLoader.loadClass("com.lsp.java.jvm.User1");
//        Object obj = clazz.newInstance();
//        Method method = clazz.getDeclaredMethod("sout", null);
//        method.invoke(obj, null);
//        System.out.println(clazz.getClassLoader());
//
////        System.out.println();
////        MyClassLoader classLoader1 = new MyClassLoader("D:/test1");
////        Class clazz1 = classLoader1.loadClass("com.tuling.jvm.User1");
////        Object obj1 = clazz1.newInstance();
////        Method method1 = clazz1.getDeclaredMethod("sout", null);
////        method1.invoke(obj1, null);
////        System.out.println(clazz1.getClassLoader());
//    }
//}
